package com.itheima.mapper;

import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpLoginLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {

    @Select("select * from emp where username = #{username} and password = #{password}")
    Emp login(Emp emp);

    @Insert("insert into emp_login_log ( username, password, login_time, is_success, jwt, cost_time) " +
            "values (#{username},#{password},#{loginTime},#{isSuccess},#{jwt},#{costTime}) ")
    void insert(EmpLoginLog ell);
}
